﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BlogArticleFollowsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Blog.BlogArticleFollowsAdmin" %>
<owc:OwGrid ID="OwBlogArticlesFollowsGrid" runat="server" SkinID="OwGridAdmin" DataSourceID="OwBlogArticlesFollowsOds"
    AutoGenerateColumns="False" OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace"
    OwMessageDisplayControl="">
    <MasterTableView DataSourceID="OwBlogArticlesFollowsOds" DataKeyNames="BlogArticleFollowID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%#Eval("BlogArticleFollowID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$OwR:BlogArticleName %>'>
                <ItemTemplate>
                    <%#OwBlogArticlesBLL.OwGetEntity((long?)Eval("BlogArticleID")).Title %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$OwR:UserName %>'>
                <ItemTemplate>
                    <%#Eval("UserID")!=null? (Membership.GetUser((Guid?)Eval("UserID"))!=null?Membership.GetUser((Guid?)Eval("UserID")).UserName:"n/a"):"n/a" %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn UniqueName="TemplateColumn">
                <EditItemTemplate>
                    <asp:LinkButton ID="Updatelb" runat="server" CommandName="Update" Text="<%$ OwR: Update %>"></asp:LinkButton>
                    &nbsp;<asp:LinkButton ID="Cancellb" runat="server" CausesValidation="false" CommandName="Cancel"
                        Text="<%$ OwR: Cancel %>"></asp:LinkButton>
                </EditItemTemplate>
                <ItemTemplate>
                    <owc:OwButton ID="OwConfirmEdit" runat="server" CausesValidation="false" Text="<%$ OwR: Edit %>"
                        CommandName="Edit">
                    </owc:OwButton>
                    <owc:OwConfirmButton ID="OwConfirmDelete" runat="server" Text="<%$ OwR: Delete %>"
                        CommandName="Delete">
                    </owc:OwConfirmButton>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template" PopUpSettings-ScrollBars="Vertical" PopUpSettings-Modal="true">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <table style="width: 800px">
                    <tr>
                        <td align="left">
                            <owc:OwR ID="BlogArtilesOwR" runat="server" OwText="BlogArticles" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwComboBox ID="BlogArticlesCbb" runat="server" DataTextField="Title" DataValueField="BlogArticleID"
                                SkinID="OwComboBox" DataSourceID="OwBlogArticlesOds" SelectedValue='<%# Bind("BlogArticleID") %>'>
                            </owc:OwComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="UserNameOwR" runat="server" OwText="UserName" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwComboBox ID="UserNameCbb" runat="server" SkinID="OwComboBox" OnInit="UserNameCbb_Init">
                            </owc:OwComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <owc:OwConfirmButton ID="btnUpdate" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
                            <owc:OwConfirmButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text='<%$ OwR:Cancel %>' />
                        </td>
                    </tr>
                </table>
            </FormTemplate>
            <PopUpSettings ScrollBars="Vertical" Modal="True"></PopUpSettings>
        </EditFormSettings>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnRowDblClick="OwRowDblClick" />
    </ClientSettings>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="OwBlogArticlesFollowsOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogArticleFollowsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogArticleFollowsBLL"
    UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="blogArticleFollowID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter Name="userID" Type="Int64" />
        <asp:Parameter Name="blogArticleID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
<owc:OwObjectDataSource ID="OwBlogArticlesOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogArticlesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetAll" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogArticlesBLL"
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
